<template>
    <div style="position: relative">
        <div class="county-title">
            {{title}}学校信息:
        </div>
        <Row>
            <Col span="4">
                <div class="county-item">
                    <span class="county-label">学校占比：</span>
                    <span class="county-num">{{totalData.schoolRote}}%</span>
                </div>
            </Col>
            <Col span="5">
                <div class="county-item">
                    <span class="county-label">幼儿：</span>
                    <span class="county-num">{{totalData.child}}人</span>
                </div>
            </Col>
            <Col span="5">
            <div>
                <div class="county-item">
                    <span class="county-label">小学：</span>
                    <span class="county-num">{{totalData.primary}}人</span>
                </div>
            </div>
            </Col>
            <Col span="5">
                <div class="county-item">
                    <span class="county-label">初中：</span>
                    <span class="county-num">{{totalData.middle}}人</span>
                </div>
            </Col>
            <Col span="5">
                <div class="county-item">
                    <span class="county-label">学校：</span>
                    <span class="county-num">{{totalData.school}}所</span>
                </div>
            </Col>
        </Row>
    </div>
</template>
<script>
    export default {
        name:'countyBottom',
        components: {
        },
        props: {
            countyTitle:{
                type: String,
                default: ''
            }

        },
        data () {
            return {
                title:'',
                totalData:{
                    schoolRote:14.6,
                    child:9781,
                    primary:781,
                    middle:150,
                    school:150
                }
            }
        },
        computed: {
        },
        methods: {
            init(){
                console.log(this.countyTitle)
                let _this=this;
//                用于初始化数据展示区县级路径返回时状态的保存
                switch (this.countyTitle){
                    case 'bjq':
                        _this.title='碧江区';
                        break;
                    case 'ws':
                        _this.title='万山区';
                        break;
                    case 'st':
                        _this.title='松桃县';
                        break;
                    case 'jk':
                        _this.title='江口县';
                        break;
                    case 'yp':
                        _this.title='玉屏县';
                        break;
                    case 'yj':
                        _this.title='印江县';
                        break;
                    case 'sn':
                        _this.title='思南县';
                        break;
                    case 'sq':
                        _this.title='石阡县';
                        break;
                    case 'dj':
                        _this.title='德江县';
                        break;
                    case 'yh':
                        _this.title='沿河县';
                        break;
                    case 'za':
                        _this.title='正安县';
                        break;
                    case 'rhs':
                        _this.title='仁怀市';
                        break;
                    case 'zyx':
                        _this.title='镇远县';
                        break;
                    case 'mjx':
                        _this.title='麻江县';
                        break;
                    case 'js':
                        _this.title='金沙县';
                        break;
                    case 'df':
                        _this.title='大方县';
                        break;
                    case 'lz':
                        _this.title='六枝特区';
                        break;
                }
            }
        },
        mounted () {
//            this.init()
        },
        created(){
            this.init()
        }
    }

</script>
<style type="text/css">
</style>